#!/bin/bash

set -e

cd $(dirname $0)/..

rm -rf generated/*

# generate the protobufs
protoc --go_out=plugins=grpc:./gen \
        -I./protos ./protos/kv.proto

python -m grpc.tools.protoc \
        -I./protos \
        --python_out=./gen \
        --grpc_python_out=./gen ./protos/kv.proto

cp ./gen/kv_pb2.py ../client/
